<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Camada de Persistencia: interface_persistencia.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Camada de Persistencia
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">interface_persistencia.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="interface__persistencia_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * interface_persistencia.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *  Created on: 12/11/2012</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="comment">/* Controle visando evitar inclusoes multiplas. */</span>
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef MOD_PERSISTENCIA</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define MOD_PERSISTENCIA</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="comment">/* Controle visando identificar os servidores. */</span>
<a name="l00015"></a>00015 <span class="preprocessor">#ifdef SERVIDOR_PERSISTENCIA_POSTAGENS</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define EXT_MOD_PERSISTENCIA_POSTAGENS</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00018"></a><a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">00018</a> <span class="preprocessor"></span><span class="preprocessor">#define EXT_MOD_PERSISTENCIA_POSTAGENS extern</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#ifdef SERVIDOR_PERSISTENCIA_USUARIOS</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define EXT_MOD_PERSISTENCIA_USUARIOS</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00025"></a><a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define EXT_MOD_PERSISTENCIA_USUARIOS extern</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdbool.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;../Camada_Apresentacao/interface_apresentacao.h&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="comment">/* Declaracoes de constantes usadas. */</span>
<a name="l00033"></a><a class="code" href="interface__persistencia_8h.html#a76eefd72b92b5b4221729b0733680af0">00033</a> <span class="preprocessor">#define DATABASE_USUARIOS &quot;database_usuarios.txt&quot;</span>
<a name="l00034"></a><a class="code" href="interface__persistencia_8h.html#a616ca1ae875a3c64fe8facbe3c94e0f1">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_USUARIOS_AUXILIAR &quot;database_usuarios_aux.txt&quot;</span>
<a name="l00035"></a><a class="code" href="interface__persistencia_8h.html#a95e81096ebfc2694d294eccc5576ebfd">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_POSTAGENS &quot;database_postagens.txt&quot;</span>
<a name="l00036"></a><a class="code" href="interface__persistencia_8h.html#a6de048a1c36eacd9ac8dac2b1e60d1cc">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_POSTAGENS_AUXILIAR &quot;database_postagens_aux.txt&quot;</span>
<a name="l00037"></a><a class="code" href="interface__persistencia_8h.html#a2726f13663402b519b4dfe37eac15901">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_COMENTARIOS &quot;database_comentarios.txt&quot;</span>
<a name="l00038"></a><a class="code" href="interface__persistencia_8h.html#ad41f4948004b76056adb67f11f853951">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_COMENTARIOS_AUXILIAR &quot;database_comentarios_aux.txt&quot;</span>
<a name="l00039"></a><a class="code" href="interface__persistencia_8h.html#a5dbed5829d85de857e4b090b9a88a8e0">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define DATABASE_IDENTIFICADORES &quot;database_identificadores.txt&quot;</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="comment">/* Declaracoes dos prototipos das funcoes. */</span>
<a name="l00044"></a>00044 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a8aab4210a69acf2efaa9f11621216b41">fatorial_postagens</a>(<span class="keywordtype">int</span> valor);
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">EXT_MOD_PERSISTENCIA_USUARIOS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a394345ea538b618b09301a537015cfdc">cadastrar_usuario_persistencia</a>(<span class="keywordtype">char</span> nome_de_usuario[11], <span class="keywordtype">char</span> senha[7], <span class="keywordtype">int</span> identificador);
<a name="l00048"></a>00048 <a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">EXT_MOD_PERSISTENCIA_USUARIOS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a516e571b3f3fe609e95d7d7428dce900">autenticar_usuario_persistencia</a>(<span class="keywordtype">char</span> nome_de_usuario[11], <span class="keywordtype">char</span> senha[7]);
<a name="l00049"></a>00049 <a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">EXT_MOD_PERSISTENCIA_USUARIOS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#aedb4fba30825b9ae3206371f81553a40">alterar_cadastro_persistencia</a>(<span class="keywordtype">char</span> nome_de_usuario[11], <span class="keywordtype">char</span> senha[7], <span class="keywordtype">char</span> novo_nome_de_usuario[11], <span class="keywordtype">char</span> nova_senha[7]);
<a name="l00050"></a>00050 <a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">EXT_MOD_PERSISTENCIA_USUARIOS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#ad9caaee93b5ebd734cdd08710496d726">encerrar_cadastro_persistencia</a>(<span class="keywordtype">char</span> nome_de_usuario[11], <span class="keywordtype">char</span> senha[7]);
<a name="l00051"></a>00051 <a class="code" href="interface__persistencia_8h.html#a355f6a6312e6afd1fc9ab3c96d31ca9d">EXT_MOD_PERSISTENCIA_USUARIOS</a> Usuario* <a class="code" href="interface__persistencia_8h.html#a817200ddc88fbec2f97e53a7d79f8cd4">listar_usuarios_persistencia</a>();
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#adeec061857b96fe3905d5a1b85aded2e" title="Armazena a postagem no arquivo.">cadastrar_postagem_persistencia</a>(<span class="keywordtype">char</span> texto_postagem[31], <span class="keywordtype">int</span> identificador_postagem, <span class="keywordtype">bool</span> comentavel, <span class="keywordtype">int</span> identificador_autor,<span class="keywordtype">char</span> data[11]);
<a name="l00055"></a>00055 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a0efbdf083f56298fa1618f07e22cdf1b" title="Armazenar comentario na persistencia.">cadastrar_comentario_persistencia</a>(<span class="keywordtype">char</span> texto_comentario[21], <span class="keywordtype">int</span> identificador_comentario, <span class="keywordtype">int</span> identificador_postagem, <span class="keywordtype">int</span> identificador_autor, <span class="keywordtype">char</span> data[11]);
<a name="l00056"></a>00056 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> Postagem* <a class="code" href="interface__persistencia_8h.html#a46cca7086a46e600352fcaf1efd0f7f4">busca_postagem_persistencia</a>(<span class="keywordtype">int</span> identificador_autor);
<a name="l00057"></a>00057 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> Comentario* <a class="code" href="interface__persistencia_8h.html#a16a4b26748764ab85b3d585424b1bf4a">busca_comentario_persistencia</a>(<span class="keywordtype">int</span> identificador_autor);
<a name="l00058"></a>00058 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a8d8a560f657075ef4a12f1c916fee956">autenticar_postagem_persistencia</a>(<span class="keywordtype">int</span> identificador_postagem);
<a name="l00059"></a>00059 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a30278fdf8a6476293506fa5a5f88118b">autenticar_comentario_persistencia</a>(<span class="keywordtype">int</span> identificador_comentario);
<a name="l00060"></a>00060 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a9997a758463d695cdadb068bccc2b1c3" title="Avaliar postagem.">avaliar_postagem_persistencia</a>(<span class="keywordtype">int</span> identificador_postagem, <span class="keywordtype">float</span> avaliacao);
<a name="l00061"></a>00061 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#abab35facf2e1907eebc14abc141514da" title="Remover postagem do arquivo.">remover_postagem_persistencia</a>(<span class="keywordtype">int</span> identificador_postagem, <span class="keywordtype">int</span> verifica_autoria);
<a name="l00062"></a>00062 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a92aaa7175d66765002355b663c845c8d" title="Remover comentario do arquivo.">remover_comentario_persistencia</a>(<span class="keywordtype">int</span> identificador_comentario, <span class="keywordtype">int</span> verifica_autoria);
<a name="l00063"></a>00063 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#a91e031b021f8c1099f8ff781b3b405f9" title="Remover postagens do usuario do arquivo.">remover_postagens_usuario_persistencia</a>(<span class="keywordtype">int</span> identificador_autor);
<a name="l00064"></a>00064 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#afb53db147e2a2156e2d54d5cdc1707d5" title="Remover comentarios do arquivo.">remover_comentarios_usuario_persistencia</a>(<span class="keywordtype">int</span> identificador_autor);
<a name="l00065"></a>00065 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> Postagem* <a class="code" href="interface__persistencia_8h.html#a9950fffe90a534116bfde840dbb9dcfd" title="Listar as postagens do arquivo.">listar_postagens_persistencia</a>();
<a name="l00066"></a>00066 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> Comentario* <a class="code" href="interface__persistencia_8h.html#a3bf2d547771b427725fcda2def53e7d1">listar_comentarios_persistencia</a>(<span class="keywordtype">int</span> identificador_postagem);
<a name="l00067"></a>00067 <a class="code" href="interface__persistencia_8h.html#a10a3f6ca357cd3f5ac651f989707a9a8">EXT_MOD_PERSISTENCIA_POSTAGENS</a> <span class="keywordtype">int</span> <a class="code" href="interface__persistencia_8h.html#abd2189858a1486f400f3017726df6f55">verificar_identificador_livre</a>(<span class="keywordtype">int</span> identificador);
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 3 2013 19:14:32 for Camada de Persistencia by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
